const express = require('express')
const cors = require('cors');
const app = express()
const port = 3000
app.use(cors())

// 监听 /getBook
app.get('/getBook', (req, res) => res.send({
    status: 200,
    data: '书'
}))
// 监听 /getName
app.get('/getName', (req, res) => res.send({
    status: 200,
    data: '名字'
}))
// 监听 /getSex
app.get('/getSex', (req, res) => res.send({
    status: 200,
    data: '男'
}))

app.listen(port, () => console.log(`Example app listening on port http://127.0.0.1:3000`))